package com.blb.zycommunity.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blb.zycommunity.entity.SysDictType;
import com.blb.zycommunity.entity.ZyRepair;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.blb.zycommunity.entity.vo.ZyOwenVo;

import java.util.List;

/**
 * <p>
 * 报修信息 Mapper 接口
 * </p>
 *
 * @author chenheng
 * @since 2023-11-20
 */
public interface ZyRepairMapper extends BaseMapper<ZyRepair> {

    /**
     * 根据用户名，搜索信息，查询所有的报修记录
     */
    List<ZyRepair> findRepair(String userName, String keyword, Long curNow);

    /**
     * 根据用户名查询所有房屋
     */
    List<ZyOwenVo> findByName(String name);

    /**
     * 查询所有报修并分页
     */
    Page<ZyRepair> findRepairPage(Page<ZyRepair> page, String repairScope, String repairContent,
                                  String startTime, String finishTime);

    /**
     * 修改报修的del_flag为1
     */
    void updateDelFlag(Long id);
}
